
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreProductLogRequest struct {

	Type string `json:"type" form:"type"`

	ProductId string `json:"product_id" form:"product_id"`

	Uid string `json:"uid" form:"uid"`

	VisitNum string `json:"visit_num" form:"visit_num"`

	CartNum string `json:"cart_num" form:"cart_num"`

	OrderNum string `json:"order_num" form:"order_num"`

	PayNum string `json:"pay_num" form:"pay_num"`

	PayPrice string `json:"pay_price" form:"pay_price"`

	CostPrice string `json:"cost_price" form:"cost_price"`

	PayUid string `json:"pay_uid" form:"pay_uid"`

	RefundNum string `json:"refund_num" form:"refund_num"`

	RefundPrice string `json:"refund_price" form:"refund_price"`

	CollectNum string `json:"collect_num" form:"collect_num"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *StoreProductLogRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreProductLogRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"type": "required",

		"product_id": "required",

		"uid": "required",

		"visit_num": "required",

		"cart_num": "required",

		"order_num": "required",

		"pay_num": "required",

		"pay_price": "required",

		"cost_price": "required",

		"pay_uid": "required",

		"refund_num": "required",

		"refund_price": "required",

		"collect_num": "required",

		"add_time": "required",

	}
}

func (r *StoreProductLogRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductLogRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductLogRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
